<?php

/* @var $this VoteController */
/* @var $curPartai VoteController */

$this->addCssFile('legislatif-partai.css');
?>
<br /><br /><br />
        <div class="col-lg-12">
            <!--ini buat baris pertama -->
            <div class="row1">
                <?php list4(1, $curPartai); ?>
            </div>
            <!--ini buat detail partainya -->


            <!--ini buat baris kedua -->
            <div class="row2">
                <?php list4(5, $curPartai); ?>
                <!-- this is the CONTRENG button GUYS!-->
                <!-- <div class="col-lg-4">
                    <div class="contrengButton">
                        <img src="img/contreng.png">
                    </div>
                </div> -->
            </div>
        </div>
        <div class="detail">
            <div class="contrengButton">
                <button type="submit"></button>

            </div>
        </div>

<?php

function list4($pid, $curPartai) {
    for ($i = 0; $i < 4; $i++, $pid++) : ?>
        <div class="col-lg-2" id="partai1">
            <input type="radio" name="partai" value="<?php echo $pid ?>"
                   id="pilihan-<?php echo $pid ?>" <?php if ($curPartai == $pid) echo 'checked=""' ?> />
            <label class="baris1 aktif" for="pilihan-<?php echo $pid ?>">
                <img src="images/partai<?php echo $pid ?>.png">
                <span class="check"></span>
            </label>
        </div>
    <?php endfor;
}
